<?php

Yii::import('ext.Hq.HqController.HqController');

class DefaultController extends HqController
{
	public $layout = 'column1';

	public $version = 'v1';

	function accessRules()
	{
		return CMap::mergeArray(array(
			array('allow',
				'users' => array('@'),
				'expression' => 'isset($user->roles) && (!empty($user->roles))'),
			array('deny',
				'users' => array('*'),
			),
		), parent::accessRules());
	}

	function actionIndex()
	{
		$this->render('index');
	}

	function actionError()
	{
		$this->render('error', Yii::app()->errorHandler->error);
	}
}
